package com.clstu.properties;

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;

public class Properties01 {
    public static void main(String[] args) throws IOException {//用传统方法读取配置文件中的信息
        BufferedReader br = new BufferedReader(new FileReader("src\\mysql.properties"));
        String line = null;
        while ((line=br.readLine())!=null){
            String[] split = line.split("=");
            if(split[0].equals("ip"))//只打印ip
            System.out.println(split[0]+"======="+split[1]);
        }
        br.close();
    }
}
